import request from '@/utils/request';

// 获取员工离职分页列表
export const staffDepartManagePageList = ({
  currentPage,
  totalPage,
  totalEntries,
  pageSize,
  queryCriteria,
  stateFlag,
}) => {
  return request({
    url: '/personnelManagement/employees/getResignationApplicationForm',
    method: 'POST',
    data: {
      currentPage,
      totalPage,
      totalEntries,
      pageSize,
      queryCriteria,
      stateFlag,
    },
  });
};

// 获取生成的链接
export const getStaffDepLinkReq = (data) => {
  return request({
    url: '/personnelManagement/employees/resignationApplication',
    method: 'POST',
  });
};

// 离职
export const agreeDepartAPI = ({ employeeId, id }) => {
  return request({
    url: '/personnelManagement/employees/agreeDepart',
    method: 'POST',
    data: {
      employeeId,
      id,
    },
  });
};
